package com.education.web.auth.fegin;

import com.education.web.common.core.constants.Constants;
import com.education.web.common.core.utils.Result;
import com.education.web.dto.AdminUserSession;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @author zengjintao
 * @version 1.0
 * @create_at 2019/12/16 20:43
 */
@FeignClient(value = Constants.JFAST_WEB_API_ADMIN_SERVER, fallback = SystemAdminFeignImpl.class)
public interface SystemAdminFeign {

    /**
     * 注意这里的对象不加泛型的话， 接口会默认将对象转换成map
     * @param userName
     * @return
     */
    @GetMapping("/admin/selectByName")
    Result<AdminUserSession> selectByName(@RequestParam String userName);


    @GetMapping("/admin/getSystemSecurityUser")
    Result getSystemSecurityUser();

    @GetMapping("/admin/test")
    Map test();
}
